﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HammerMUD.System;
using HammerMUD.Admin;

namespace HammerMUD.Commands
{
    public abstract class Command
    {
        private String name;
        private String help;
        private SecurityLevel securityLevel;

        public SecurityLevel SecurityLevel
        {
            get { return securityLevel; }
            set { securityLevel = value; }
        }

        public String Help
        {
            get { return help; }
            set { help = value; }
        }

        public String Name
        {
            get { return name; }
            set { name = value; }
        }

        public abstract void Do(User from, List<String> arguments);

        internal static List<Command> SetUpCommands()
        {
            List<Command> commandList = new List<Command>();

            // When adding a command, add it to this list as well!!
            ///////////////////
            // Basic commands
            ///////////////////
            // Basic communication commands
            commandList.Add(new SayCommand());
            // Basic information commands
            commandList.Add(new WhoCommand());
            commandList.Add(new QuitCommand());
            commandList.Add(new LookCommand());
            commandList.Add(new InventoryCommand());
            // Basic action commands
            commandList.Add(new GetCommand());
            commandList.Add(new DropCommand());

            ///////////////////
            // Admin commands
            ///////////////////
            // Admin creation commands
            commandList.Add(new MakeAreaCommand());
            commandList.Add(new MakeItemCommand());
            commandList.Add(new LinkCommand());
            commandList.Add(new MakeNpcCommand());
            // Admin edit commands
            commandList.Add(new EditRoomCommand());
            commandList.Add(new EditAreaCommand());
            commandList.Add(new EditNpcCommand());
            // Admin utilities
            commandList.Add(new GotoCommand());
            commandList.Add(new ForceSaveCommand());

            return commandList;
        }
    }
}
